package com.blb.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.blb.entity.BaseEntity;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author txy
 * @since 2019-07-11
 */
@TableName("t_commodity")
public class Commodity extends BaseEntity<Commodity> {

    private static final long serialVersionUID = 1L;

    private String name;

    private Double price;

    private String img;

    private Integer sales;

    private String brandId;

    private Integer stocks;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date putawayTime;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Integer getSales() {
        return sales;
    }

    public void setSales(Integer sales) {
        this.sales = sales;
    }

    public String getBrandId() {
        return brandId;
    }

    public void setBrandId(String brandId) {
        this.brandId = brandId;
    }

    public Integer getStocks() {
        return stocks;
    }

    public void setStocks(Integer stocks) {
        this.stocks = stocks;
    }

    public Date getPutawayTime() {
        return putawayTime;
    }

    public void setPutawayTime(Date putawayTime) {
        this.putawayTime = putawayTime;
    }

    @Override
    protected Serializable pkVal() {
        return null;
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "name=" + name +
                ", price=" + price +
                ", img=" + img +
                ", sales=" + sales +
                ", brandId=" + brandId +
                ", stocks=" + stocks +
                ", putawayTime=" + putawayTime +
                "}";
    }
}
